<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
	<script type="text/javascript" src="<%=basePath%>js/jquery-1.3.1.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/splitPage.css">
	<script type="text/javascript">
		 $(function(){
				$("#page").change(function(){
					var page = $("#page").val();
					window.location.href="OrderInfo!getAllOrderItemInfo?page=" + page;
				});
				$("#search").change(function() {
					var isPayed = $("#search").val() ;
					window.location.href = "OrderInfo!getOrderItermsByKeyWords?orderItem.isPayed=" + isPayed;
				}) ;
			});
	</script>
  </head>
  
  <body bgcolor="#D6DFF7" >
  <form name="conditionForm" action="OrderInfo!getOrderItermsByKeyWords"
	method="post">
	<table border="0" width="100%">
		<tr bgcolor="#799AE1" height="40">
			<td>&nbsp;&nbsp;&nbsp;
			按支付状态查询：
			<SELECT name="orderItem.isPayed" id="search">
			   	<option >-选择-</option>
			   	<option value="0">未支付</option>
			   	<option value="1">已支付</option>
			</SELECT>
			</td>
		</tr>
		</table>
	</form>
    <table width="100%" align="center" class="TABLELIST" border="0" >
  <tr  bgcolor="#DEE5FA" height="50"><td height="30" colspan="8" align="center" >
           <font color="#874B46" size="4pt">航班订单</font>
      </td>
  </tr>
  <tr>
    <td align="center">
		<table width="100%" cellspacing="1" class="" id="xtable" border="0"  bgcolor="#DEE5FA" >
	<thead>
		<tr bgcolor="#799AE1" height="40" align="center" >
        	<td width="10%">订单号</td>
            <td width="20%">订单生成时间</td>
            <td width="10%">用户ID</td>
			<td width="10%">航班号</td>
			<td width="15%">起飞时间</td>
            <td width="15%">支付状态</td>
            <td width="10%">修改</td>
			<td width="10%">删除</td>
         </tr>
    </thead>
	<tbody>
	<tr>
		<td colspan="8">
			<s:if test="pageBean.list.size == 0">您还没有预订任何机票</s:if>
	</td>
	</tr>
	<s:iterator value="pageBean.list">
      <tr id="TRID" class="TRSTYLE">
	        <td height="30" align="center"><s:property value="id"/></td>
			<td height="30" align="center"><s:property value="createDate"/></td>
	        <td height="30" align="center"><s:property value="user.id"/></td>
	        <td height="30" align="center"><s:property value="flightArrange.flight.id"/></td>
	        <td height="30" align="center"><s:property value="flightArrange.startDate"/></td>
	        <td height="30" align="center">
	        	<s:if test="isPayed == 0">未支付</s:if>
	        	<s:else>已支付</s:else>
	        </td>
	        <td height="30" align="center"><a href="OrderInfo!getOrderItemById?orderItem.id=<s:property value="id"/>">修改</a></td>
			<td height="30" align="center">
				<a href="OrderInfo!deleteOrderItem?orderItem.id=<s:property value="id"/>">删除</a>
			</td>
      	</tr>
      </s:iterator>
	  </tbody>
    </table>
	</td>
  </tr>
  <tr>
  <td colspan="8">
  <table width="100%">
  	<tr bgcolor="#DEE5FA">
  	<td width="30%" align="left">
		共检索到
		<s:property value="pageBean.allRow" />
		条记录
	</td>
	<td align="right" id="pagelist">
		  <ul>
		  	<li>
		  		 <select name="page" id="page">
			  	<s:iterator value="pageBean.pageNumbers" status="pageNumbers">
				  	<s:iterator value="pageBean.pageNumbers[#pageNumbers.index]">
			  		<option value="<s:property/>"><s:property/></option>
				  	</s:iterator>
			  	</s:iterator>
			</select>
		  	</li>
		    <li class="pageinfo">共<s:property value="pageBean.totalPage" />页</li>
		    <li class="pageinfo">第<s:property value="pageBean.currentPage" />页</li>
		    <s:if test="%{pageBean.currentPage != pageBean.totalPage}">
				<li><a href="OrderInfo!getAllOrderItemInfo?page=<s:property value="pageBean.totalPage"/>">尾页</a></li>
				<li><a href="OrderInfo!getAllOrderItemInfo?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a></li>
			</s:if>
		  	<s:if test="%{pageBean.currentPage == 1}"></s:if>
		  	<s:else>
				<li><a href="OrderInfo!getAllOrderItemInfo?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a></li>
				<li><a href="OrderInfo!getAllOrderItemInfo?page=1">首页</a></li>
			</s:else>
		  </ul>
	</td>
  	</tr>
  </table>
  </td>
  </tr>
</table>

  </body>
</html>
